<link rel="stylesheet" type="text/css" href="/js/gritter/css/jquery.gritter.css" />
<script type="text/javascript" src="/js/gritter/js/jquery.gritter.min.js"></script>
<script>

@if (count($errors) > 0)

    @foreach ($errors->all() as $error)
        $.gritter.add({
        title: '错误信息',
        //image: '/img/gritter/settings.png',
        text:'{{$error}}',
        sticky: false,
        time: ''});
        @break
    @endforeach

@elseif (count($request->old()) > 0)

    @foreach ($request->old() as $key => $message)
        $.gritter.add({
        //image: '/img/gritter/settings.png',
        text:'{{$message}}',
        sticky: false,
        time: '',
        class_name: 'gritter-light'});
        @break
    @endforeach
@endif

</script>